<script>
	export default {
		globalData: {
			privacyContractName: '', //需要弹窗展示的隐私协议名称
			showPrivacy: false //全局控制弹窗显隐
		},
		onLaunch: function() {
			// 初始化蓝牙
			this.$store.commit('openBluetoothAdapter');

			const that = this;
			// #ifdef MP-WEIXIN
			wx.getPrivacySetting({
				success(res) {
					// console.log('是否需要授权：', res.needAuthorization, '隐私协议的名称为：', res.privacyContractName);
					if (res.needAuthorization) {
						that.globalData.privacyContractName = res.privacyContractName;
						that.globalData.showPrivacy = true;
					} else {
						that.globalData.showPrivacy = false;
					}
				}
			});
			// #endif
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
	}
</script>

<style lang="scss">
	@import "@/static/iconfont.css";
	/*每个页面公共css */
	/* 注意要写在第一行，同时给style标签加入lang="scss"属性 */
	@import "uview-ui/index.scss";
</style>